home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\INCLUDE\CTCP.H < prev    next >
C/C++ Source or Header  |  1994-12-28  |  2KB  |  73 lines

  1. /*
  2.  * ctcp.h: header file for ctcp.c
  3.  *
  4.  * Written By Michael Sandrof
  5.  *
  6.  * Copyright(c) 1990 
  7.  *
  8.  * See the COPYRIGHT file, or do a HELP IRCII COPYRIGHT 
  9.  *
  10.  * @(#)$Id: ctcp.h,v 1.6 1994/10/15 23:25:22 mrg Stab $
  11.  */
  12.  
  13. #ifndef _CTCP_H_
  14. #define _CTCP_H_
  15.  
  16. /*
  17.  * ctcp_entry: the format for each ctcp function.   note that the function
  18.  * described takes 4 parameters, a pointer to the ctcp entry, who the message
  19.  * was from, who the message was to (nickname, channel, etc), and the rest of
  20.  * the ctcp message.  it can return null, or it can return a malloced string
  21.  * that will be inserted into the oringal message at the point of the ctcp.
  22.  * if null is returned, nothing is added to the original message
  23.  */
  24. typedef    struct
  25. {
  26.     char    *name;                 /* name of ctcp datatag */
  27.     char    *desc;                 /* description returned by ctcp clientinfo */
  28.     int    flag;
  29.     char    *(*func)();           /* function that does the dirty deed */
  30. }    CtcpEntry;
  31.  
  32. #define CTCP_DELIM_CHAR '\001'
  33. #define CTCP_DELIM_STR "\001"
  34. #define CTCP_QUOTE_CHAR '\\'
  35. #define CTCP_QUOTE_STR "\\"
  36.  
  37. #define CTCP_QUOTE_EM "\n\r\001\\"
  38.  
  39. #define CTCP_PRIVMSG 0
  40. #define CTCP_NOTICE 1
  41.  
  42. #define    CTCP_SED 0
  43. #define CTCP_VERSION 1
  44. #define CTCP_CLIENTINFO 2
  45. #define    CTCP_USERINFO 3
  46. #define    CTCP_ERRMSG 4
  47. #define    CTCP_FINGER 5
  48. #define    CTCP_TIME 6
  49. #define CTCP_ACTION 7
  50. #define    CTCP_DCC_CHAT 8
  51. #define    CTCP_UCT 9
  52. #define CTCP_PING 10
  53. #define CTCP_ECHO 11
  54. #define    NUMBER_OF_CTCPS 12
  55.  
  56. extern    char    *ctcp_type[];
  57. extern    int    sed;
  58.  
  59. extern    char    *do_ctcp();
  60. extern    char    *ctcp_quote_it();
  61. extern    char    *ctcp_unquote_it();
  62. extern    char    *do_notice_ctcp();
  63. extern    int    in_ctcp();
  64. #ifdef USE_STDARG_H
  65. extern        void    send_ctcp_reply(char *, char *, char *, ...);
  66. extern        void    send_ctcp(char *, char *, char *, char *, ...);
  67. #else
  68. extern    void    send_ctcp_reply();
  69. extern    void    send_ctcp();
  70. #endif
  71.  
  72. #endif /* _CTCP_H_ */
  73.